<div>
    <br/>
    <ol class="breadcrumb">
        <li class="active">
            <span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;
            <mainpage></mainpage>
        </li>
        <li class="active">运维工作台 / 参数配置管理 / 接口参数管理 / 短信接入分级</li>
    </ol>
    <div class="rightbar">
        <div id="serviceEnd" class="showEle sign1">
            <form action="smSign/out-excel" method="post" id="form" class="showEle sign1 clearfix form-inline">
                <div class="left marT15 marR10">
                    <span class="search-name">业务端名称</span>
                    <select class="form-control1 svrNodeName" ng-change='getSms()' ng-model="searchData.svrNode" name="svrNode">
                        <option value="">全部</option>
                        <option value={{row.SVR_NODE}} ng-repeat="row in listData1">{{row.SVR_NODE_NAME}}</option>
                    </select>

                </div>
                <div class="left marT15 marR10">
                    <span class="search-name">短信类型</span>
                    <select class="form-control1 svrNode" ng-model="searchData.serviceCode" name="serviceCode">
                        <option value="">全部</option>
                        <option value={{row.serviceCode}} ng-repeat="row in listData2">{{row.serviceName}}</option>
                    </select>
                </div>
                <div class="left marT15 marR10">
                    <span class="search-name">分级类型</span>
                    <select class="form-control1" ng-model="searchData.type" name="type">
                        <option value="">全部</option>
                        <option value="2">流量</option>
                        <option value="1">流速</option>
                    </select>
                </div>
                <div class="left marT15 marR10">
                    <span class="search-name">周期</span>
                    <div class="controls">
                        <input type="text" ng-model="searchData.startDate" placeholder="" name="startDate" style="display: none;">
                        <input type="text" ng-model="searchData.endDate" placeholder="" name="endDate" style="display: none;">
                        <div class="input-prepend input-group">
                            <span class="add-on input-group-addon">
                                <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                            </span>
                            <input type="text" readonly style="width: 155px" id="smsAccessDate" class="form-control" />
                            <span class="input-group-addon" ng-click='clearTime()'>清空</span>
                        </div>
                    </div>
                </div>
                <a href="javascript:;" class=" btn btn-sm btn-primary left marT15" id="search" ng-click='search()'>
                    <span class="glyphicon glyphicon-search"></span>
                </a>
            </form>

            <div class="table-box">
                <table class="table table-bordered table-striped text-center bg-info marT15">
                    <thead>
                        <tr class="info">
                            <th class="text-center">序号</th>
                            <th class="text-center">业务端名称</th>
                            <th class="text-center">短信类型</th> 
                            <th class="text-center">分级类型</th>
                            <th class="text-center">单位</th>
                            <th class="text-center">流量值/【流速值】</th>
                            <th class="text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody id="appList">
                        <tr ng-repeat="Item in result">
                            <td>{{ $index+1 }}</td>
                            <td class="w115">{{ Item.svrNodeName }}</td>
                            <td class="w115">{{ Item.serviceName }}</td>
                            <td class="w115">{{ Item.timeunit }}</td>
                            <td class="w115">{{ Item.limittype }}</td>
                            <td class="w115">{{ Item.flowspeed }}</td>
                            <td style="min-width: 200px">
                                <a class="marR10" data-toggle="modal" data-target="#add" ng-click="editTr('修改',Item.recId)">修改</a>
                                <a class="marR10" data-toggle="modal" data-target="#delete" ng-click="delete(Item.recId)">删除</a>
                            </td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr>
                            <td>
                                <a class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add" ng-click='editTr("添加")'></a>
                            </td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </tfoot>
                </table>
            </div>

            <page></page>
        </div>
    </div>
</div>

<!--添加程序弹窗-->
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="add">{{popup}}短信接入分级</h4>
            </div>
            <div class="modal-body">
                <div class="row marB15">
                    <div class="col-xs-6">
                        <div class="input-group  left">
                            <span class="input-group-addon">业务端名称</span>
                            <select class="form-control" ng-model="addData.svrNode" ng-change="getServiceCode()" name="svrNode">
                                <option value="">--请选择--</option>
                                <option value={{row.SVR_NODE}} ng-repeat="row in listData1">{{row.SVR_NODE_NAME}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="input-group  left">
                            <span class="input-group-addon">短信类型</span>
                            <select class="form-control" ng-model="addData.serviceCode" name="serviceCode">
                                <option value="">--请选择--</option>
                                <option value={{row.serviceCode}} ng-repeat="row in listData2">{{row.serviceName}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row marB15">
                    <div class="col-xs-6">
                        <div class="input-group left">
                            <span class="input-group-addon">分级类型</span>
                            <select class="form-control" ng-model='addData.limittype' ng-click='seleMonitor(addData.limittype)' data-ng-init="load(addData.limittype)">
                                <option value="">--请选择--</option>
                                <option value='1'>流速</option>
                                <option value='2'>流量</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-xs-6">
                        <div class="input-group left">
                            <span span class="input-group-addon">单位</span>
                            <select class="form-control" ng-model='addData.timeunit' >
                                <option value="">--请选择--</option>
                                <option value={{item.index}} ng-repeat="item in selectData">{{item.Name}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row marB15">
                    <div class="col-xs-6">
                        <div class="input-group left">
                            <span span class="input-group-addon">流量值/流速值 ：</span>
                            <input type="text" class="form-control" ng-model='addData.flowspeed'>
                        </div>
                    </div>
                </div>
                <br>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click='editSave()'>保存</button>
            </div>
        </div>
    </div>
</div>
<!-- 添加程序结束 -->

<!-- 提示框 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认删除吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url" />
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a class="btn btn-primary" data-dismiss="modal" ng-click='deleteTr()'>确定</a>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<!-- 加载框 -->
<span class='loaded' ng-show='loaded'>
    <img src="img/load.gif">
</span>
<!-- 加载框 完成-->